<template>
	<view class="corporation">
		<view class="headerbox">
			
		
		<view class="header">
			<view class="left">
				公司
			</view>
			<view class="top_right" @click="toSearch">
				<input type="text" placeholder="搜索...">
				<uni-icons class="search" type="search" size="30" color="#b4b4b4"></uni-icons>
			</view>

		</view>
		</view>
		<view class="lists">
			<corporationItem :companyList='companyList'></corporationItem>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				companyList: []
			};
		},
		onLoad() {
			uni.request({
				url: 'https://yw.52kfw.cn/api/v1/company/company-list'
			}).then((res) => {
				console.log(res.data.data);
				this.companyList = res.data.data.list
			})
		},
		methods:{
			toSearch(){
				uni.navigateTo({
					url:"/pages/search/search"
				})
			},
		}
	}
</script>

<style lang="scss">
	.corporation {
		.headerbox{
			height: 120rpx;
		}
		.header {
			display: flex;
			justify-content: space-between;
			align-items: center;
			background-color: #65b159;
			height: 120rpx;
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			z-index: 999;
			.left {
				font-size: 40rpx;
				color: #fff;
				padding-left: 30rpx;
			}

			.top_right {
				position: relative;
				padding-right: 30rpx;

				input {
					width: 540rpx;
					height: 60rpx;
					line-height: 60rpx;
					border-radius: 30rpx;
					background-color: #f5f5f5;
					text-indent: 40rpx;
				}

				.search {
					font-size: 32rpx;
					color: #b6b6b6;
					position: absolute;
					top: 0rpx;
					right: 40rpx;
				}

			}
		}

		.lists {
			padding: 30rpx;
			padding-bottom: 100rpx;
			background-color: #fefefe;
		}
	}
</style>
